
using System.Data.Entity.ModelConfiguration;

namespace OBUCare.Core.Models.Mapping
{
    public class REPAIR_ORDER_PRICEMap : EntityTypeConfiguration<REPAIR_ORDER_PRICE>
    {
        public REPAIR_ORDER_PRICEMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.OBU_NO)
                .IsRequired()
                .IsFixedLength()
                .HasMaxLength(16);

            this.Property(t => t.REMARK)
                .HasMaxLength(500);

            this.Property(t => t.CREATED_BY)
                .IsRequired()
                .IsFixedLength()
                .HasMaxLength(6);

            this.Property(t => t.MODIFY_BY)
                .IsRequired()
                .IsFixedLength()
                .HasMaxLength(6);

            this.Property(t => t.PRICE_FLAG).IsRequired().HasMaxLength(5);

            // Table & Column Mappings
            this.ToTable("REPAIR_ORDER_PRICE");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.SUPPLIER_ID).HasColumnName("SUPPLIER_ID");
            this.Property(t => t.BACK_DATE).HasColumnName("BACK_DATE");
            this.Property(t => t.REPAIR_ORDER_ID).HasColumnName("REPAIR_ORDER_ID");
            this.Property(t => t.OBU_NO).HasColumnName("OBU_NO");
            this.Property(t => t.FAULT_PARTS).HasColumnName("FAULT_PARTS");
            this.Property(t => t.PRICE).HasColumnName("PRICE");
            this.Property(t => t.SUPPLIER_PRICE).HasColumnName("SUPPLIER_PRICE");
            this.Property(t => t.PRICE_FLAG).HasColumnName("PRICE_FLAG");
            this.Property(t => t.REMARK).HasColumnName("REMARK");
            this.Property(t => t.CREATED_BY).HasColumnName("CREATED_BY");
            this.Property(t => t.CREATED_DATE).HasColumnName("CREATED_DATE");
            this.Property(t => t.MODIFY_BY).HasColumnName("MODIFY_BY");
            this.Property(t => t.MODIFY_DATE).HasColumnName("MODIFY_DATE");
        }
    }
}
